@echo off

REM substitute G:\Parser\ in the following for the directory where flex++.exe resides

setlocal
set path=G:\parser\;%path%
flex++.exe -Cem -L -i -o"%~f2" -+ "%~f1"
IF NOT ERRORLEVEL 1 amend_file "%~f2"
endlocal